import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { UIActionTool, Util, ViewTool } from '@/utils';
import { Watch, EditFormControlBase } from '@/studio-core';
import EMApplyService from '@/service/emapply/emapply-service';
import Main7Service from './main7-form-service';
import EMApplyUIService from '@/uiservice/emapply/emapply-ui-service';
import {
    FormButtonModel,
    FormPageModel,
    FormItemModel,
    FormDRUIPartModel,
    FormPartModel,
    FormGroupPanelModel,
    FormIFrameModel,
    FormRowItemModel,
    FormTabPageModel,
    FormTabPanelModel,
    FormUserControlModel,
} from '@/model/form-detail';

/**
 * form部件基类
 *
 * @export
 * @class EditFormControlBase
 * @extends {Main7EditFormBase}
 */
export class Main7EditFormBase extends EditFormControlBase {
    /**
     * 获取部件类型
     *
     * @protected
     * @type {string}
     * @memberof Main7EditFormBase
     */
    protected controlType: string = 'FORM';

    /**
     * 建构部件服务对象
     *
     * @type {Main7Service}
     * @memberof Main7EditFormBase
     */
    public service: Main7Service = new Main7Service({ $store: this.$store });

    /**
     * 实体服务对象
     *
     * @type {EMApplyService}
     * @memberof Main7EditFormBase
     */
    public appEntityService: EMApplyService = new EMApplyService({ $store: this.$store });

    /**
     * 应用实体名称
     *
     * @protected
     * @type {string}
     * @memberof Main7EditFormBase
     */
    protected appDeName: string = 'emapply';

    /**
     * 应用实体中文名称
     *
     * @protected
     * @type {string}
     * @memberof Main7EditFormBase
     */
    protected appDeLogicName: string = '外委申请';

    /**
     * 界面UI服务对象
     *
     * @type {EMApplyUIService}
     * @memberof Main7Base
     */  
    public appUIService: EMApplyUIService = new EMApplyUIService(this.$store);


    /**
     * 主键表单项名称
     *
     * @protected
     * @type {number}
     * @memberof Main7EditFormBase
     */
    protected formKeyItemName: string = 'emapplyid';
    /**
     * 表单数据对象
     *
     * @type {*}
     * @memberof Main7EditFormBase
     */
    public data: any = {
        srfupdatedate: null,
        srforikey: null,
        srfkey: null,
        srfmajortext: null,
        srftempmode: null,
        srfuf: null,
        srfdeid: null,
        srfsourcekey: null,
        emapplyid: null,
        applystate: null,
        emapplyname: null,
        applytype: null,
        priority: null,
        entrustlist: null,
        plantype: null,
        applybdate: null,
        applyedate: null,
        applydesc: null,
        prefee: null,
        shuifei: null,
        zfy: null,
        prefee1: null,
        pfee: null,
        mfee: null,
        sfee: null,
        fp: null,
        dpdesc: null,
        spyj: null,
        invoiceattach: null,
        equipname: null,
        objname: null,
        objid: null,
        rempid: null,
        rempname: null,
        rdeptid: null,
        rdeptname: null,
        rteamid: null,
        rteamname: null,
        rservicename: null,
        mpersonid: null,
        mpersonname: null,
        applydate: null,
        closeempname: null,
        closeempid: null,
        closedate: null,
        rfodename: null,
        rfomoname: null,
        rfocaname: null,
        rfoacname: null,
        orgid: null,
        description: null,
        createman: null,
        createdate: null,
        updateman: null,
        updatedate: null,
        rfodeid: null,
        rfoacid: null,
        rserviceid: null,
        rfomoid: null,
        rfocaid: null,
        equipid: null,
        emapply: null,
    };

    /**
     * 主信息属性映射表单项名称
     *
     * @type {*}
     * @memberof Main7EditFormBase
     */
    public majorMessageField: string = 'emapplyname';

    /**
     * 属性值规则
     *
     * @type {*}
     * @memberof Main7EditFormBase
     */
    public rules(): any{
        return {
            emapplyname: [
                {
                    required: this.detailsModel.emapplyname.required,
                    type: 'string',
                    message: `${this.$t('entities.emapply.main7_form.details.emapplyname')}  ${this.$t('app.commonWords.valueNotEmpty')}`,
                    trigger: 'change',
                },
                {
                    required: this.detailsModel.emapplyname.required,
                    type: 'string',
                    message: `${this.$t('entities.emapply.main7_form.details.emapplyname')}  ${this.$t('app.commonWords.valueNotEmpty')}`,
                    trigger: 'blur',
                },
        ],
            applytype: [
                {
                    required: this.detailsModel.applytype.required,
                    type: 'string',
                    message: `${this.$t('entities.emapply.main7_form.details.applytype')}  ${this.$t('app.commonWords.valueNotEmpty')}`,
                    trigger: 'change',
                },
                {
                    required: this.detailsModel.applytype.required,
                    type: 'string',
                    message: `${this.$t('entities.emapply.main7_form.details.applytype')}  ${this.$t('app.commonWords.valueNotEmpty')}`,
                    trigger: 'blur',
                },
        ],
            entrustlist: [
                {
                    required: this.detailsModel.entrustlist.required,
                    type: 'string',
                    message: `${this.$t('entities.emapply.main7_form.details.entrustlist')}  ${this.$t('app.commonWords.valueNotEmpty')}`,
                    trigger: 'change',
                },
                {
                    required: this.detailsModel.entrustlist.required,
                    type: 'string',
                    message: `${this.$t('entities.emapply.main7_form.details.entrustlist')}  ${this.$t('app.commonWords.valueNotEmpty')}`,
                    trigger: 'blur',
                },
        ],
            applydate: [
                {
                    required: this.detailsModel.applydate.required,
                    type: 'string',
                    message: `${this.$t('entities.emapply.main7_form.details.applydate')}  ${this.$t('app.commonWords.valueNotEmpty')}`,
                    trigger: 'change',
                },
                {
                    required: this.detailsModel.applydate.required,
                    type: 'string',
                    message: `${this.$t('entities.emapply.main7_form.details.applydate')}  ${this.$t('app.commonWords.valueNotEmpty')}`,
                    trigger: 'blur',
                },
        ],
        }
    }

    /**
     * 属性值规则
     *
     * @type {*}
     * @memberof Main7Base
     */
    public deRules:any = {
    };

    /**
     * 详情模型集合
     *
     * @type {*}
     * @memberof Main7EditFormBase
     */
    public detailsModel: any = {
        grouppanel2: new FormGroupPanelModel({ caption: '外委修理信息', detailType: 'GROUPPANEL', name: 'grouppanel2', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.emapply.main7_form', extractMode: 'ITEM', details: [] } }),

        grouppanel24: new FormGroupPanelModel({ caption: '对象信息', detailType: 'GROUPPANEL', name: 'grouppanel24', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.emapply.main7_form', extractMode: 'ITEM', details: [] } }),

        grouppanel27: new FormGroupPanelModel({ caption: '责任信息', detailType: 'GROUPPANEL', name: 'grouppanel27', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.emapply.main7_form', extractMode: 'ITEM', details: [] } }),

        grouppanel36: new FormGroupPanelModel({ caption: '故障信息', detailType: 'GROUPPANEL', name: 'grouppanel36', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.emapply.main7_form', extractMode: 'ITEM', details: [] } }),

        formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),

        grouppanel42: new FormGroupPanelModel({ caption: '操作信息', detailType: 'GROUPPANEL', name: 'grouppanel42', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.emapply.main7_form', extractMode: 'ITEM', details: [] } }),

        formpage41: new FormPageModel({ caption: '其它', detailType: 'FORMPAGE', name: 'formpage41', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),

        srfupdatedate: new FormItemModel({
    caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 0,
}),

        srforikey: new FormItemModel({
    caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        srfkey: new FormItemModel({
    caption: '外委编号', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 0,
}),

        srfmajortext: new FormItemModel({
    caption: '外委申请名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        srftempmode: new FormItemModel({
    caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        srfuf: new FormItemModel({
    caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        srfdeid: new FormItemModel({
    caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        srfsourcekey: new FormItemModel({
    caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        emapplyid: new FormItemModel({
    caption: '外委修理编号(自动)', detailType: 'FORMITEM', name: 'emapplyid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 0,
}),

        applystate: new FormItemModel({
    caption: '申请汇报状态', detailType: 'FORMITEM', name: 'applystate', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 0,
}),

        emapplyname: new FormItemModel({
    caption: '外委申请名称', detailType: 'FORMITEM', name: 'emapplyname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:true,
    disabled: false,
    enableCond: 3,
}),

        applytype: new FormItemModel({
    caption: '申请类型', detailType: 'FORMITEM', name: 'applytype', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:true,
    disabled: false,
    enableCond: 3,
}),

        priority: new FormItemModel({
    caption: '优先级', detailType: 'FORMITEM', name: 'priority', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        entrustlist: new FormItemModel({
    caption: '外委类型', detailType: 'FORMITEM', name: 'entrustlist', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:true,
    disabled: false,
    enableCond: 3,
}),

        plantype: new FormItemModel({
    caption: '计划类型', detailType: 'FORMITEM', name: 'plantype', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        applybdate: new FormItemModel({
    caption: '希望开始于', detailType: 'FORMITEM', name: 'applybdate', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        applyedate: new FormItemModel({
    caption: '希望完成早于', detailType: 'FORMITEM', name: 'applyedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        applydesc: new FormItemModel({
    caption: '外委申请内容', detailType: 'FORMITEM', name: 'applydesc', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        prefee: new FormItemModel({
    caption: '费用(￥)', detailType: 'FORMITEM', name: 'prefee', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        shuifei: new FormItemModel({
    caption: '税费', detailType: 'FORMITEM', name: 'shuifei', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        zfy: new FormItemModel({
    caption: '总费用', detailType: 'FORMITEM', name: 'zfy', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        prefee1: new FormItemModel({
    caption: '预算费用(￥)', detailType: 'FORMITEM', name: 'prefee1', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        pfee: new FormItemModel({
    caption: '人工费(￥)', detailType: 'FORMITEM', name: 'pfee', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        mfee: new FormItemModel({
    caption: '材料费(￥)', detailType: 'FORMITEM', name: 'mfee', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        sfee: new FormItemModel({
    caption: '服务费(￥)', detailType: 'FORMITEM', name: 'sfee', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        fp: new FormItemModel({
    caption: '发票号', detailType: 'FORMITEM', name: 'fp', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        dpdesc: new FormItemModel({
    caption: '处理备注', detailType: 'FORMITEM', name: 'dpdesc', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        spyj: new FormItemModel({
    caption: '审批意见', detailType: 'FORMITEM', name: 'spyj', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        invoiceattach: new FormItemModel({
    caption: '发票附件', detailType: 'FORMITEM', name: 'invoiceattach', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        equipname: new FormItemModel({
    caption: '设备', detailType: 'FORMITEM', name: 'equipname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        objname: new FormItemModel({
    caption: '位置', detailType: 'FORMITEM', name: 'objname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        objid: new FormItemModel({
    caption: '位置', detailType: 'FORMITEM', name: 'objid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rempid: new FormItemModel({
    caption: '责任人', detailType: 'FORMITEM', name: 'rempid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 2,
}),

        rempname: new FormItemModel({
    caption: '责任人', detailType: 'FORMITEM', name: 'rempname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 2,
}),

        rdeptid: new FormItemModel({
    caption: '责任部门', detailType: 'FORMITEM', name: 'rdeptid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 2,
}),

        rdeptname: new FormItemModel({
    caption: '责任部门', detailType: 'FORMITEM', name: 'rdeptname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 2,
}),

        rteamid: new FormItemModel({
    caption: '责任班组', detailType: 'FORMITEM', name: 'rteamid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rteamname: new FormItemModel({
    caption: '责任班组', detailType: 'FORMITEM', name: 'rteamname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rservicename: new FormItemModel({
    caption: '服务商', detailType: 'FORMITEM', name: 'rservicename', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        mpersonid: new FormItemModel({
    caption: '申请人', detailType: 'FORMITEM', name: 'mpersonid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        mpersonname: new FormItemModel({
    caption: '申请人', detailType: 'FORMITEM', name: 'mpersonname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        applydate: new FormItemModel({
    caption: '申请日期', detailType: 'FORMITEM', name: 'applydate', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:true,
    disabled: false,
    enableCond: 0,
}),

        closeempname: new FormItemModel({
    caption: '关闭人', detailType: 'FORMITEM', name: 'closeempname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        closeempid: new FormItemModel({
    caption: '关闭人', detailType: 'FORMITEM', name: 'closeempid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        closedate: new FormItemModel({
    caption: '关闭日期', detailType: 'FORMITEM', name: 'closedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rfodename: new FormItemModel({
    caption: '现象', detailType: 'FORMITEM', name: 'rfodename', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rfomoname: new FormItemModel({
    caption: '模式', detailType: 'FORMITEM', name: 'rfomoname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rfocaname: new FormItemModel({
    caption: '原因', detailType: 'FORMITEM', name: 'rfocaname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rfoacname: new FormItemModel({
    caption: '方案', detailType: 'FORMITEM', name: 'rfoacname', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        orgid: new FormItemModel({
    caption: '组织', detailType: 'FORMITEM', name: 'orgid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        description: new FormItemModel({
    caption: '描述', detailType: 'FORMITEM', name: 'description', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        createman: new FormItemModel({
    caption: '建立人', detailType: 'FORMITEM', name: 'createman', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 0,
}),

        createdate: new FormItemModel({
    caption: '建立时间', detailType: 'FORMITEM', name: 'createdate', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 0,
}),

        updateman: new FormItemModel({
    caption: '更新人', detailType: 'FORMITEM', name: 'updateman', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 0,
}),

        updatedate: new FormItemModel({
    caption: '更新时间', detailType: 'FORMITEM', name: 'updatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 0,
}),

        rfodeid: new FormItemModel({
    caption: '现象', detailType: 'FORMITEM', name: 'rfodeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rfoacid: new FormItemModel({
    caption: '方案', detailType: 'FORMITEM', name: 'rfoacid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rserviceid: new FormItemModel({
    caption: '服务商', detailType: 'FORMITEM', name: 'rserviceid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rfomoid: new FormItemModel({
    caption: '模式', detailType: 'FORMITEM', name: 'rfomoid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        rfocaid: new FormItemModel({
    caption: '原因', detailType: 'FORMITEM', name: 'rfocaid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        equipid: new FormItemModel({
    caption: '设备', detailType: 'FORMITEM', name: 'equipid', visible: true, isShowCaption: true, form: this, showMoreMode: 0,
    required:false,
    disabled: false,
    enableCond: 3,
}),

        form: new FormTabPanelModel({
            caption: 'form',
            detailType: 'TABPANEL',
            name: 'form',
            visible: true,
            isShowCaption: true,
            form: this,
            tabPages: [
                {
                    name: 'formpage1',
                    index: 0,
                    visible: true,
                },
                {
                    name: 'formpage41',
                    index: 1,
                    visible: true,
                },
            ]
        }),
    };

    /**
     * 表单项逻辑
     *
     * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
     * @returns {Promise<void>}
     * @memberof Main7EditFormBase
     */
    public async formLogic({ name, newVal, oldVal }: { name: string; newVal: any; oldVal: any }): Promise<void> {
                




































































        if (Object.is(name, 'equipname')) {
            const details: string[] = ['rdeptid', 'rdeptname', 'objid', 'rteamname', 'rempname', 'rempid', 'rteamid', 'objname'];
            this.updateFormItems('FormUpdateByEmquipId', this.data, details, true);
        }
    }

    /**
     * 新建默认值
     * @memberof Main7EditFormBase
     */
    public createDefault() {                    
        if (this.data.hasOwnProperty('applystate')) {
            this.data['applystate'] = 0;
        }
        if (this.data.hasOwnProperty('applytype')) {
            this.data['applytype'] = 'OSC';
        }
        if (this.data.hasOwnProperty('priority')) {
            this.data['priority'] = '2';
        }
        if (this.data.hasOwnProperty('mpersonid')) {
            this.data['mpersonid'] = this.context['srfuserid'];
        }
        if (this.data.hasOwnProperty('mpersonname')) {
            this.data['mpersonname'] = this.context['srfusername'];
        }
        if (this.data.hasOwnProperty('applydate')) {
            this.data['applydate'] = this.$util.dateFormat(new Date());
        }
        if (this.data.hasOwnProperty('orgid')) {
            this.data['orgid'] = 'TOP';
        }
    }

    /**
     * 面板数据变化处理事件
     * @param {any} item 当前数据
     * @param {any} $event 面板事件数据
     *
     * @memberof Main7Base
     */
    public onPanelDataChange(item:any,$event:any) {
        Object.assign(item, $event, {rowDataState:'update'});
    }
}